1. Field of the Invention
The present invention relates to encoding apparatuses and encoding methods suited to encode a digital motion image input from a camera or other device, and also relates to storage media for storing an encoding program for encoding a digital motion image.
2. Description of the Related Art
In a conventional technology, to encode a motion image with the most suitable number of codes at a uniform image quality, tentative encoding is performed first to estimate a suitable number of codes, and then the number of codes estimated in the tentative encoding is used for a next encoding. With this method, a large number of codes can be assigned to a frame which requires a large number of codes, and the number of codes can be reduced for a frame which does not require a large number of codes.
When an image sent from a camera is encoded in real time, there has conventionally been only one method in which a target number of codes is specified for each set of a plurality of frames, a next target number of codes is re-specified by the use of an encoding capacity and the first target number of codes, and the number of codes is set to a constant rate within the set of the plurality of frames.
In the conventional method employing tentative encoding, since encoding is required twice, the method takes twice the amount of time to be performed as compared to that required in conventional encoding techniques, which perform encoding only once.
Moreover, in the conventional method specifying the target number of codes, since the number of codes is set to a constant rate within the set of the plurality of frames, when the input image moves fast or a color band is broad, quantization becomes coarse. As a result, an image having non-uniform frames may be generated. Also, when the input image moves slow, or when a color band is narrow, an undesirably extra number of codes is often used.